package org.particlethink.response;

import io.swagger.v3.oas.annotations.media.Schema;
import org.particlethink.entry.DeliverStatus;
import org.particlethink.model.*;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;

public class DeliverDetailResponse {
    private DeliverResponse info;
    private List<PlanMaterialResponse> planMaterials;
    @Schema(description = "验收信息")
    private AcceptanceResponse acceptance;


    public DeliverDetailResponse(DeliverResponse info, List<PlanMaterialResponse> planMaterials, Acceptance acceptance, ProjectUser acceptanceUser) {
        this.info = info;
        this.planMaterials = planMaterials;
        if (acceptance != null && acceptanceUser != null) {
            this.acceptance = new AcceptanceResponse(acceptance, acceptanceUser);
        }
    }

    public DeliverResponse getInfo() {
        return info;
    }

    public void setInfo(DeliverResponse info) {
        this.info = info;
    }

    public List<PlanMaterialResponse> getPlanMaterials() {
        return planMaterials;
    }

    public void setPlanMaterials(List<PlanMaterialResponse> planMaterials) {
        this.planMaterials = planMaterials;
    }

    public AcceptanceResponse getAcceptance() {
        return acceptance;
    }

    public void setAcceptance(AcceptanceResponse acceptance) {
        this.acceptance = acceptance;
    }
}
